#include <iostream>
#include <vector>

using namespace std;
class Solution
{
public:
    int convertTime(string current, string correct)
    {
        int time1 = stoi(current.substr(0, 2)) * 60 + stoi(current.substr(3, 2));
        int time2 = stoi(correct.substr(0, 2)) * 60 + stoi(correct.substr(3, 2));
        int diff = time2 - time1; // 需要增加的分钟数
        int res = 0;
        // 尽可能优先使用增加数值更大的操作
        vector<int> ops = {60, 15, 5, 1};
        for (int t : ops)
        {
            res += diff / t;
            diff %= t;
        }
        return res;
    }
};
int main()
{
    Solution s;
    string current = "02:30", correct = "04:35";
    cout << s.convertTime(current, correct) << endl;
    return 0;
}